package com.itboye.sunsunhome.www.aq;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.base.BaseActivity;

public class MDeviceActivity extends BaseActivity {
	TextView tvTitle, title;
	ImageView imgAdd;
	Button btnNext;
	ImageView back;

	@Override
	protected void onCreate(Bundle arg0) {
		// TODO Auto-generated method stub
		super.onCreate(arg0);
		setContentView(R.layout.activity_manualdevice);
		btnNext = (Button) findViewById(R.id.btnNext);
//		// 注册广播
		IntentFilter intentFilterAvart = new IntentFilter("stopfinish");
		registerReceiver(avartBroadcastReceiver, intentFilterAvart);
		back=(ImageView) findViewById(R.id.back);
		back.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
		btnNext.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent mainIntent = new Intent(MDeviceActivity.this,
						 SmartConfigActivity.class);
						startActivity(mainIntent);
						Intent intent=new Intent("finish");
						sendBroadcast(intent);
//						finish();
//				overridePendingTransition(0, 0);
			}
		});
	}

	BroadcastReceiver avartBroadcastReceiver = new BroadcastReceiver() {
		public void onReceive(Context context, Intent intent) {
			finish();
		};
	};
}
